/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package py.gestionpymes.seguridad.web;

import org.jasypt.util.password.StrongPasswordEncryptor;

/**
 *
 * @author cromero
 */
public class Encryptador {

    public static String encrypta(String clave) {
        StrongPasswordEncryptor encryptor = new StrongPasswordEncryptor();
        return encryptor.encryptPassword(clave);
    }

    public static boolean verica(final String plainPassword, final String encryptedPassword) {
        StrongPasswordEncryptor encryptor = new StrongPasswordEncryptor();
        return encryptor.checkPassword(plainPassword, encryptedPassword);
    }
}
